package com.ruoyi.snake;

import javax.swing.*;
import java.net.URL;

// 存放外部数据
public class Data {
    // 头部图片 URL:定位图片地址 ImageIcon:图片
    public static URL headerurl = Data.class.getResource("../../../statics/snake/header.png");
    public static ImageIcon header = new ImageIcon(headerurl);

    // 贪吃蛇头部
    public static URL upurl = Data.class.getResource("../../../statics/snake/up.png");
    public static URL downurl = Data.class.getResource("../../../statics/snake/down.png");
    public static URL lefturl = Data.class.getResource("../../../statics/snake/left.png");
    public static URL righturl = Data.class.getResource("../../../statics/snake/right.png");
    public static ImageIcon up = new ImageIcon(upurl);
    public static ImageIcon down = new ImageIcon(downurl);
    public static ImageIcon left = new ImageIcon(lefturl);
    public static ImageIcon right = new ImageIcon(righturl);
    // 贪吃蛇身体
    public static URL bodyurl = Data.class.getResource("../../../statics/snake/body.png");
    public static ImageIcon body = new ImageIcon(bodyurl);

    // 食物
    public static URL foodurl = Data.class.getResource("../../../statics/snake/food.png");
    public static ImageIcon food = new ImageIcon(foodurl);
}
